package com.resataurant.Entity;

import java.sql.Timestamp;
import java.text.SimpleDateFormat;
import java.time.LocalDateTime;
import java.util.Date;

public class Order {

    public String getW_Name() {
        return w_Name;
    }

    public void setW_Name(String w_Name) {
        this.w_Name = w_Name;
    }

    public String getW_Price() {
        return w_Price;
    }

    public void setW_Price(String w_Price) {
        this.w_Price = w_Price;
    }

    public String getW_user_id() {
        return w_user_id;
    }

    public void setW_user_id(String w_user_id) {
        this.w_user_id = w_user_id;
    }

    private String getCurrentDate() {
        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(Timestamp.valueOf(LocalDateTime.now()));
    }

    public String getW_date() {
        return w_date;
    }

    public Integer getW_num() {
        return w_num;
    }

    public void setW_num(Integer w_num) {
        this.w_num = w_num;
    }

    public Order(String w_Name, String w_Price, String w_user_id, Date w_date) {
        this.w_Name = w_Name;
        this.w_Price = w_Price;
        this.w_user_id = w_user_id;
        this.w_date = getCurrentDate();
    }

    public Order(){
        this.w_date = getCurrentDate();
    }

    public String getW_id() {
        return w_id;
    }

    public void setW_id(String w_id) {
        this.w_id = w_id;
    }

    public String getW_contenct() {
        return w_contenct;
    }

    public void setW_contenct(String w_contenct) {
        this.w_contenct = w_contenct;
    }

    private String w_id;
    private String w_Name;
    private String w_Price;
    private String w_user_id;
    private String w_date;
    private String w_contenct;
    private Integer w_num;
}
